import request from "@/utils/request";
/**
 * 添加sku
 * @param {*} query
 * @returns
 */
export const addSku = (query) => {
  return request({
    url: "/ds/specification/adds",
    method: "get",
    params: query,
  });
};
/**
 * 查询sku
 * @param {*} query
 * @returns
 */
export const skuList = (query) => {
  return request({
    url: "/ds/specification/list",
    method: "get",
    params: query,
  });
};

export const skuDetail = (query) => {
  return request({
    url: `/ds/specification/${query.id}`,
    method: "get",
    params: query,
  });
};

/**
 * sku key列表
 * @param {*} query
 * @returns
 */
export const keyList = (query) => {
  return request({
    url: "/ds/key/list",
    method: "get",
    params: query,
  });
};
/**
 * sku添加key
 * @param {*} query
 * @returns
 */
export const addKey = (query) => {
  return request({
    url: "/ds/key/add",
    method: "post",
    params: query,
  });
};
/**
 * sku value列表
 * @param {*} query
 * @returns
 */
export const valueList = (query) => {
  return request({
    url: "/ds/value/list",
    method: "get",
    params: query,
  });
};
/**
 * sku添加value
 * @param {*} query
 * @returns
 */
export const valueAdd = (query) => {
  return request({
    url: "/ds/value/addt",
    method: "post",
    params: query,
  });
};
